//
//  Cell1.m
//  UI09_4_Cell 高度自动调整
//
//  Created by Scott on 15/7/26.
//  Copyright (c) 2015年 www.lanou3g.com 蓝欧3G. All rights reserved.
//

#import "Cell1.h"

@implementation Cell1

- (void)dealloc
{
    [_myLabel release];
    [super dealloc];
}

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.myLabel = [[UILabel alloc] init];
        self.myLabel.backgroundColor = [UIColor greenColor];
        [self.contentView addSubview:self.myLabel];
        self.myLabel.numberOfLines = 0;
        [_myLabel release];
        
        self.myTitle = [[UILabel alloc] init];
        self.myTitle.backgroundColor = [UIColor redColor];
        [self.contentView addSubview:self.myTitle];
        [_myTitle release];
        
        
        
    }
    
    
    return self;
}



- (void)layoutSubviews
{
    [super layoutSubviews];

    self.myTitle.frame = CGRectMake(0, 0, self.contentView.frame.size.width, 40);
    
    self.myLabel.frame = CGRectMake(0, 40, self.contentView.frame.size.width, self.contentView.frame.size.height);
    [self.myLabel sizeToFit];
    
    
}

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
